<template>
  <el-container>
    <el-aside :style="{ width: leftWidth }">
      <LeftSlider :left-width="leftWidth" />
    </el-aside>
    <el-container>
      <el-header height="40px"><Top /></el-header>
      <TagsNav />
      <div class="main">
        <transition mode="out-in" name="fade-transform">
          <keep-alive :include="$store.getters['tags-menu/getCacheList']" max="6">
            <router-view />
          </keep-alive>
        </transition>
      </div>
    </el-container>
  </el-container>
  <!-- <el-container>
    <el-header height="64px"><Top /></el-header>
    <el-container>
      <el-aside :style="{ width: leftWidth }">
        <LeftSlider :left-width="leftWidth" />
      </el-aside>
      <el-main>
        <TagsNav />
        <transition mode="out-in" name="fade-transform">
          <keep-alive :include="$store.getters['tags-menu/getCacheList']" max="6">
            <router-view />
          </keep-alive>
        </transition>
      </el-main>
    </el-container>
  </el-container> -->
</template>

<script>
import LeftSlider from './components/LeftSlider'
import Top from './components/Top'
import TagsNav from './components/TagsNav'
export default {
  name: 'Default',
  components: { Top, LeftSlider, TagsNav },
  data() {
    return {}
  },
  computed: {
    leftWidth() {
      return this.$store.getters['style/getLeftWidth']
    }
  },
  created() {},
  mounted() {},
  methods: {}
}
</script>

<style lang="scss" scoped>
.el-container {
  padding: 0;
  height: 100%;
  width: 100%;
}
.el-header {
  padding: 0;
}
.main {
  padding: 5px 10px 10px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  height: calc(100% - 40px);
  /*滚动条整体样式*/
  &::-webkit-scrollbar {
    width: 5px;
    height: 1px;
  }
  /*滚动条滑块*/
  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #535353;
  }
  /*滚动条轨道*/
  &::-webkit-scrollbar-track {
    border-radius: 10px;
    background: #ffffff;
  }
}
.el-main {
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  /*滚动条整体样式*/
  &::-webkit-scrollbar {
    width: 5px;
    height: 1px;
  }
  /*滚动条滑块*/
  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #535353;
  }
  /*滚动条轨道*/
  &::-webkit-scrollbar-track {
    border-radius: 10px;
    background: #ffffff;
  }
}
/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
  transition: all 0.2s;
}

.fade-transform-enter {
  opacity: 0;
  transform: translateX(-10px);
}

.fade-transform-leave-to {
  opacity: 0;
  transform: translateX(10px);
}
</style>
